1. Field of the Invention
The present invention relates to media and apparatuses for recording data streams, as well as a program that describes a method for recording data streams. More particularly, the present invention relates to media and apparatuses for recording multi-media data streams conforming to the MPEG, as well as programs that describe the methods for recording data streams.
2. Description of the Related Art
In order to record and transmit mass digital data converted from video and audio information, there have been proposed various methods such as the MPEG (Moving Picture Experts Group) and they have grown into such international standard encoding methods as the ISO/IEC 11172 standard and the ISO/IEC 13818 standard. Those methods have been employed widely for digital satellite broadcasting and DVDs and now very familiar even to ordinary people.
In addition, along with the progress and spread of digital video cameras, as well the appearance of such mass data recording media as DVD-RAM, DVD-RW, etc. on the market in recent years, the users come to expect strongly to cope with the processings of video and audio data recorded as digital data. Many researches and developments have been promoted to search, analyze, and edit such digital data to meet the expectation.
The ISO/IEC 13818 standard (hereinafter, to be described as the MEPG-2 standard) is one of the methods and consists of an ISO/IEC 13818-1 standard (hereinafter, to be described as the system standard), an ISO/IEC 13818-2 standard (hereinafter, to be described as the video standard), and an ISO/IEC 13818-3 standard (hereinafter, to be described as the audio standard). The system standard is employed to multiplex streams conforming to the video standard and the audio standard. A stream means a sequence of encoded video or audio data. Video data is encoded in pictures. When in editing, however, video data is handled in groups, each consisting of a plurality of pictures (hereinafter, to be described as the GOP). The GOP is a unit of estimating a movement compensation. Audio data is encoded in units of audio accesses (hereinafter, to be described as the AAU). Such encoded data is referred to as an elementary stream. Generally, video elementary streams and audio elementary streams are set in different packets and multiplexed independently of each other. A Transport Stream (TS) or the like is used to multiplex such the video and audio data. A multiplexed data stream is edited for each unit of consecutive packets between a packet that includes the start of a GOP and a packet that includes the start of the next GOP (hereinafter, to be described as the VOBU).
The MPEG-2 standard defines that an elementary stream conforming to both video and audio standards is divided into proper long blocks and a header is added to each of the blocks to be grouped as a packet. And, data is multiplexed in such packets.
On the other hand, when a multiplexed stream is resolved into video data and audio data and played back at the decoding side, video data and audio data of the stream are stored in different buffers. Video data and audio data are thus multiplexed at different timings, properly to each of them. In addition, because video data is larger than audio data in size in the same unit of playback time, the video data, when it is decoded, needs a larger buffer. Consequently, video packets are multiplexed earlier than audio packets in each multiplexed stream. FIG. 2 shows how a multiplexed stream is edited. In the case where a stream is divided at a cutting point (201), that is, a VOBU boundary, the preceding stream (202) comes to have a video playback end time, which is earlier than the audio playback end time while the following stream (203) comes to have a video playback start time, which is earlier than the audio playback start time. This is why a gap (204) occurs between those video and audio playback times.
For example, it takes thought here for a case in which a preceding stream created as described above is connected to the following stream created at another place and the connected streams are edited so that both video and audio data in the streams are played back smoothly non-stop. Such the nonstop playback is referred to as seamless playback. And, editing streams so as to play back them seamlessly is referred to as seamless connection. The MPEG-2 standard regulates conditions that both video and audio playback end times at the end of a preceding stream and both video, as well as audio playback start times at the start of the following stream must be synchronized respectively (at least, within a predetermined tolerance of one AAU playback time) to realize such the seamless connection. However, two streams created as described above come to generate a gap between the video and audio playback times and the gap disables such the seamless connection without employing some measures to eliminate the gap.
Conventionally, to realize such the seamless connection, packet headers are removed from both preceding and following streams to obtain elementary streams, then video and audio data are decoded and their playback times are adjusted to eliminate the gap between video and audio playback times. Then, the data is encoded and recorded as packets or recorded as another stream.
The JP-A No. 112944/1999 discloses a method for adjusting an audio gap between a stream broadcast from a key station and another stream held in a relay station. According to this method, at first, both video and audio elementary streams are taken out from the received transport stream, then the playback time of the audio data held in the relay station is compared with that of the received audio data. If a gap occurs between those playback times, the gap is eliminated with use of soundless audio access unit(s) and the stream is transformed into packets, which are then multiplexed to create a transport stream. This method, however, just processes elementary streams and connects a stream to each received stream, then records and transmits the connected streams as a new stream.
On the other hand, the JP-A No. 37204/1996 discloses a method for editing data in elementary streams. This method, as well as the above-described method, however, have to process a huge amount of data, since they are always required to take out elementary streams from packets, decide/re-encode streams, as well as re-arrange data files recorded on a recording medium after some data in such a file is processed. This is why it has been very difficult for those methods, as well as other conventional methods to realize the above-described seamless connection in such small devices as video cameras.
Under such circumstances, it is an object of the present invention to provide a method for realizing such the seamless connection only by eliminating a gap of the playback time between video data and audio data in a stream in a simple way; the method has successfully eliminated processings for removing packet headers from a multiplexed stream to take out elementary streams and decode/re-encode elementary streams and re-arrange data files recorded on a recording medium. It is also another object of the present invention to provide a recording medium for recording multiplexed streams created according to the above method, a program that describes the method for creating data packets, a data recording apparatus, and a video camera.